<template>
  <el-row
    class="no-data"
    type="flex"
    align="middle"
    justify="center"
    :style="{
      paddingTop: marginTop,
      paddingBottom: marginBottom
    }"
  >
    <el-image v-if="image" :size="size" :style="{ width: size + 'px' }" :src="image"></el-image>
    <div class="desc">{{ text }}</div>
  </el-row>
</template>

<script>
export default {
  props: {
    image: {
      type: [String, Boolean],
      default: require('@/assets/images/public/empty_img.png')
    },
    size: {
      type: Number,
      default: 182
    },
    text: {
      type: String,
      default: '暂时没有内容哦~'
    },
    marginTop: {
      type: String,
      default: '30px'
    },
    marginBottom: {
      type: String,
      default: '30px'
    }
  }
}
</script>

<style lang="scss" scoped>
.no-data {
  flex-direction: column;
  .desc {
    font-size: 14px;
    color: $text-color-auxiliary;
  }
}
</style>
